import Layout from '@/views/layout'

export default {
  path: '/order',
  name: 'order',
  component: Layout,
  redirect: '/order/share',
  meta: {
    title: '订单管理',
    icon: 'nested',
    perm: 'm:order',
    sort: 3
  },
  children: [
    {
      path: '/order/share',
      name: 'orderShare',
      component: () => import('@/views/order/share'),
      meta: {
        title: '时租订单',
        icon: 'table',
        perm: 'm:order:share',
        noCache: true
      }
    },
    {
      path: '/order/rent',
      name: 'orderRent',
      component: () => import('@/views/order/rent'),
      meta: {
        title: '长租订单',
        icon: 'table',
        perm: 'm:order:rent',
        noCache: true
      }
    },
    {
      path: '/order/review-share/:id/:num?',
      name: 'orderShareReview',
      hidden: true,
      component: () => import('@/views/order/review-car'),
      meta: {
        title: '查看车况图片',
        icon: 'table',
        activeMenu: '/order/share',
        perm: 'm:order:share:review'
      }
    },
    {
      path: '/order/review-rent/:id/:num?',
      name: 'orderRentReview',
      hidden: true,
      component: () => import('@/views/order/review-car'),
      meta: {
        title: '查看车况图片',
        icon: 'table',
        activeMenu: '/order/rent',
        perm: 'm:order:rent:review'
      }
    },
    {
      path: '/order/share-identity/:type/:num/:name?',
      name: 'orderReviewIdentity',
      hidden: true,
      component: () => import('@/views/order/review-car'),
      meta: {
        title: '查看证件图片',
        icon: 'table',
        activeMenu: '/order/share',
        perm: 'm:order:share:identity'
      }
    },
    {
      path: '/order/rent-identity/:type/:num/:name?',
      name: 'orderReviewIdentity',
      hidden: true,
      component: () => import('@/views/order/review-car'),
      meta: {
        title: '查看证件图片',
        icon: 'table',
        activeMenu: '/order/rent',
        perm: 'm:order:rent:identity'
      }
    }
  ]
}
